<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        * {
            padding: 0;
            margin: 0;
        }
        #container{
            background: url("/static/images/back.png") no-repeat;
            height: 1060px;
            background-size: cover;

        }
        .container {
            height: 700px;
            width: 600px;
            border-radius: 30px;
            position: relative;
            top: 180px;
            margin: auto;
            box-sizing: border-box;
            background: rgba(0, 0, 0, 0.6);

        }
        .container > img{
            width: 150px;
            border-radius: 75px;
            margin-left: 225px;
            margin-top: 50px;

        }
        .headline {
            margin-top: 25px;
            text-align: center;
            font-size: 30px;
            color: white;
        }
        .register{
            float: left;
            margin-left: 100px;
        }
        .forget {
            float: right;
            margin-right: 100px;
        }
        .forget, .register{
            text-decoration: none;
            margin-bottom: 30px;
            font-size: 20px;
            margin-top: 40px;
        }
        .input>input,.login>button{
            width: 400px;
            height: 50px;
            border-radius: 25px;
            margin-top: 30px;
            margin-left: 100px;
            text-align: center;
            outline: none;
            font-size: 18px;
            background: rgba(0, 0, 0, 0.2);
            color: white;
        }
        #check_info1 {
            width: 220px;
            height: 50px;
            border-radius: 25px;
            outline: none;
            margin-left: 100px;
            margin-top: 30px;
            float: left;
            text-align: center;
            font-size: 18px;
            background: rgba(0, 0, 0, 0.2);
            color: white;
        }

        #code {
            width: 130px;
            height: 50px;
            {#background-color: aquamarine;#}
            border-radius: 25px;
            {#outline: none;#}
            margin-right: 100px;
            margin-top: 30px;
            float: right;
        }
        a{
            text-decoration: none;
            color: aquamarine;
        }
        a:hover {
            font-weight: bold;
        }
        .login>button {
            color: aquamarine;
        }
        .hint {
            color: red;
            margin-left: 210px;
        }
    </style>
</head>
<body>

<div id="container">
    <div class="container">
        <img src="/static/images/jisuanjiwangluo.jpg" alt="头像">
        <p class="hint">{{ hint }}</p>
        <form action="/login/" method="post">
            {% csrf_token %}
            <input type="hidden" name="backurl" value="{{ backurl }}">
            <div class="headline">用户登录</div>
            <div class="input">
                <input type="text" name="username" placeholder="邮箱/用户名">
            </div>
            <div class="input">
                <input type="password" name="password" placeholder="登陆密码">
            </div>
            <input type="texe" name="captcha" id="check_info1" placeholder="请输入验证码">

            <img src="/captcha/" alt="" id="code">
            <div class="login">
                <button>登录</button>
            </div>
        </form>
        <div class="register">
            <a href="/">返回首页</a>
        </div>
        <div class="forget">
            <a href="/register/">注册新用户</a>
        </div>
    </div>
    <script>
        let codeImage = document.querySelector('#code')
        codeImage.addEventListener('click', (evt) => {
            evt.target.src = '/captcha/?' + Math.random()
        })
    </script>
</div>
</body>
</html>